<template>
  <el-table
    v-loading="loading"
    :data="useList"
    highlight-current-row
    row-class-name="rowCursor"
    @selection-change="selectionChange"
    @row-click="rowClick">
    <el-table-column type="selection" width="55"></el-table-column>
    <el-table-column label="序号" type="index" width="55"></el-table-column>
    <el-table-column prop="useCaseName" label="用例名" show-overflow-tooltip></el-table-column>
    <el-table-column label="操作" width="55" show-overflow-tooltip>
      <template slot-scope="scope">
        <i class="el-icon-delete use-case" @click.stop="deleteCase(scope.row)"></i>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
    export default {
      name: "TestUseCaseList",
      props: {
        useList: {
          type: Array,
          default: () => []
        }
      },
      data() {
          return {
            loading: false,
          }
      },
      methods: {
        /**勾选集合**/
        selectionChange(val) {
          this.$emit("selectionChange", val);
        },
        /**单击用例**/
        rowClick(row) {
          this.$emit("rowClickTestUse", row);
        },
        /**点击删除按钮**/
        deleteCase(row) {
          this.$emit("rowClickDelete", row);
        }
      }
    }
</script>

<style scoped>

</style>
